<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp"%>
<%
	//获取门诊清单详情
	String ghxh = input.getDesc("ghxh","87");//挂号序号
	
	List list = QBuilder.db("basedb").queryHql("select new map(mf.ypmc as ypmc , mf.ypgg as ypgg , mf.ypdw as ypdw ,mf.ypsl as ypsl , mf.ypfj as ypfj , mf.ylsj as ylsj) from mzcfmx  mf , mzcf m where m.xh = mf.cfxh and m.jlzt = 0 and m.ghxh ="+ghxh);

	//费用明细集合
	List<Map> feelist = QBuilder.db("basedb").queryHql("select new map( js.sfrq as sfrq , m.jssjh as jssjh ,m.dxmmc as dxmmc , m.xmje as xmje) from SF_BRJSMXK m , SF_BRJSK js where m.jssjh = js.sjh and js.jlzt = 0 and js.ghxh ="+ghxh);
	
	for(Map map : feelist){
		String date =map.get("sfrq").toString();
	
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddhh:mm:ss");
		SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		map.put("sfrq",sdf1.format(sdf.parse(date)));
		
	
	}
	Map map = new HashMap();
	map.put("cflist",list);
	map.put("feelist",feelist);
	Message msg = new Message();
	msg.put("errcode",0);
	msg.put("data",map);

	out.println(msg);
%>